package com.stephen.redisdemo.controller;

import com.stephen.redisdemo.entity.vo.PageParam;
import com.stephen.redisdemo.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@CrossOrigin // 解决跨域问题
public class UserController {

    private final UserService userService;

    @GetMapping("/list")
    public Object list(@RequestBody PageParam param) {
        return userService.list(param);
    }



}
